from ir import NEC_IR
import time

    
IR_REV_PIN = 5

myir = NEC_IR(IR_REV_PIN)

if __name__ == '__main__':
    while True:
        if myir.ir_decode() is not None:
            key = myir.ir_read()
            if myir.repeat:
                print(f"You press {key}, Repeat")
            else:
                print(f"You press {key}, New")